package com.training.java.core.collections.post15;

import java.util.HashSet;
import java.util.Set;

public class SchoolHashSetDemo {

	public static void main(String[] args) {

		School school1 = new School("Ruskin", "San Jose", "Berryessa", 7);
		School school2 = new School("Cherrywood", "Milpitas", "Berryessa", 6);
		School school3 = new School("Curtner", "Milpitas", "Milpitas", 8);
		School school4 = new School("Cherrywood", "Milpitas", "Berryessa", 6);
		School school5 = new School("Cherrywood", "Milpitas", "Berryessa", 6);
		School school6 = new School("Cherrywood", "Milpitas", "Berryessa", 6);

		Set<School> schools = new HashSet<School>();

		schools.add(school1);
		schools.add(school2);
		schools.add(school3);
		schools.add(school4);
		schools.add(school5);
		schools.add(school6);

		for (School school : schools) {

			System.out.println(" School Name : " + school.getName());
			System.out.println(" School City : " + school.getCity());
			System.out.println(" School Rank : "
					+ school.getGreatSchoolRanking());
			System.out.println(" School District  : "
					+ school.getSchoolDistrict());
			System.out.println("  ");

		}

	}

}
